home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7570 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: what happens w/delete called twice ?
  5. Date: 23 Feb 1996 22:16:10 GMT
  6. Organization: Kalevi, Inc.
  7. Message-ID: <4gleba$fog@news1.usa.pipeline.com>
  8. NNTP-Posting-Host: pipe15.h1.usa.pipeline.com
  9. X-PipeUser: grantp
  10. X-PipeHub: usa.pipeline.com
  11. X-PipeGCOS: (Pete)
  12. X-Newsreader: Pipeline USA v3.3.0
  13.  
  14. On Feb 22, 1996 22:24:41 in article <what happens w/delete called twice ?>,
  15. 'kcc@interaccess.com (kcc)' wrote: 
  16.  
  17.  
  18. >Hello, 
  19. >Can someone tell me... what happens when delete is called twice  
  20. >for the same memory deallocation ie., [.. rest deleted ..] 
  21.  
  22. One way to find out is to write small test program and try 
  23. it out.  Should take about the same amount of time as it 
  24. takes to post a question :-) 
  25.  
  26. Anyway, behavior for the second (and subsequent) deletions 
  27. of a memory block is undefined.  With many compilers, you 
  28. get a program crash later on down the line and, when done 
  29. unintentionally, can take an enormous amount of time to 
  30. locate and fix.  Ask anyone who's been there, done that -- 
  31. yup, me too. :-( 
  32.  
  33. -- 
  34. Pete Grant 
  35. Kalevi, Inc. 
  36. Software Engineering & development
  37.